﻿@{
    Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@{@WorkContext.ShopConfig.SiteTitle}</title>
    @Html.Raw(WorkContext.ShopConfig.SEOKeyword)
    @Html.Raw(WorkContext.ShopConfig.SEODescription)
    <link href="@{@WorkContext.CSSCDN}/themes/default/css/base.css" rel="stylesheet" type="text/css" />
    <link href="@{@WorkContext.CSSCDN}/themes/default/css/home.css" rel="stylesheet" type="text/css" />
    <script src="@{@WorkContext.ScriptCDN}/scripts/utils.js" type="text/javascript"></script>
    <script src="@{@WorkContext.ScriptCDN}/scripts/common.js" type="text/javascript"></script>
    <script src="@{@WorkContext.ScriptCDN}/scripts/MSClass.js" type="text/javascript"></script>
    <script type="text/javascript">
        uid = @WorkContext.Uid;
        isGuestSC = @WorkContext.ShopConfig.IsGuestSC;
        scSubmitType = @WorkContext.ShopConfig.SCSubmitType;
    </script>
</head>
<body>

<div id="headerBar" class="bigBox">
<div class="box1210">
欢迎访问 @WorkContext.ShopConfig.ShopName
<div  class="headerLink">
    @if (WorkContext.Uid < 1)
    {
        <a href="@Url.Action("login", "account", new RouteValueDictionary { { "returnUrl", WorkContext.Url } })">[登录]</a>
        <a href="@Url.Action("register", "account")" class="A_b">[注册]</a>
    }
    else
    {
        @:您好: @WorkContext.NickName
        <a href="@Url.Action("logout", "account")">[退出]</a>
        if (WorkContext.AdminGid > 1)
        {
        <a href="@Url.Action("index", "home", new RouteValueDictionary { { "area", "admin" } })">[商城管理]</a>
        }
        <a href="@Url.Action("orderlist", "ucenter")">[我的订单]</a>
    }
</div>
</div> 
</div>

 @{
     List<AdvertInfo> homeTopAdvertList = Adverts.GetAdvertList(6);
     }
     @if (homeTopAdvertList != null && homeTopAdvertList.Count > 0)
     {
<div class="headerAD box1210">
    <a href="@homeTopAdvertList[0].Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@homeTopAdvertList[0].Body" width="1210" height="70" /></a>
    <a href="javascript:;" class="close" onclick="this.parentNode.style.display='none'">x</a>
</div>
     }

<div id="header" class="bigBox">
<div class="box1210" id="header1">
<a href="/" class="logo left"><img src="@{@WorkContext.ImageCDN}/themes/default/images/logo.jpg" /></a>
<div class="search left">
<div class="searchCon">
    <input type="text" id="keyword" name="keyword" class="Stext" autocomplete="off" onkeydown="javascript:if(event.keyCode==13) search(document.getElementById('keyword').value);" value="@WorkContext.SearchWord" />
    <input name="" type="button" value="搜索" class="Sbutton" onclick="search(document.getElementById('keyword').value)" />
<div class="clear"></div>
</div>

<div class="searchHot">热门搜索：
 @{
     List<AdvertInfo> searchWordAdvertList = Adverts.GetAdvertList(5);
     }
     @Html.Raw(searchWordAdvertList[0].Body)
 </div>

</div>

<div class="shopping right" onmousemove="getCartSnap()" id="cartSnapBox" onmouseout="closeCartSnap(event)">
<h2><a href="@Url.Action("index", "cart")">我的购物车<b id="cartSnapProudctCount">@WorkContext.CartProductCount</b></a></h2>
<div id="cartSnap" class="shoppingList" style=" display:none;"><div class="loding"><img src="@{@WorkContext.ImageCDN}/themes/default/images/loading.gif" /><br />加载中，请稍候... </div></div>
</div>

<div class="clear"></div>
</div>
</div>

<div id="nav" class="bigBox">
<div class="box1210">
<!-- 分类导航 -->

<div id="categorys">
<h2>全部商品分类</h2>

<div id="categorysCon">

@{
    List<NavInfo> navList = Navs.GetNavList();
    }
@{
    int layerFlag = 0;
    foreach (NavInfo info in navList)
    {
        if (info.Layer == 1)
        {
            if (layerFlag == 1)
            {
               @:</div></div>
            }
            @:<div class="item" onmouseover="this.className='item hotItem'" onmouseout="this.className='item'"><h3><a href="javascript:void(0)">@info.Name</a></h3><div class="itmeSon">
            layerFlag = 1;
        }
        else if (info.Layer == 2)
        {
            @:<dl><dt><a style="" href="javascript:void(0)">@info.Name</a></dt><dd>
            foreach (NavInfo nav in navList.FindAll(x => x.Pid == info.Id))
            {
                 @:<em><a style="" href="@nav.Url">@nav.Name</a></em>
            }
            @:</dd><div class="clear"></div></dl>
        }
    }
    @:</div></div>
}

</div>

</div>

<!-- 分类导航结束 -->

<ul id="navItme">
<li><a href="/">首页</a></li>
<li><a href="@Url.Action("category", "catalog", new RouteValueDictionary { { "cateId", 55 } })">电视专场</a></li>
<li><a href="@Url.Action("category", "catalog", new RouteValueDictionary { { "cateId", 65 } })">电脑专场</a></li>
<li><a href="@Url.Action("category", "catalog", new RouteValueDictionary { { "cateId", 71 } })">手机专场</a></li>
</ul>
</div>
</div>

<div id="index1" class="box1210">
<div class="indexPic left">
    @{
        BannerInfo[] bannerList = Banners.GetHomeBannerList(0);
    }
    <div style="overflow:hidden;width:670px;height:240px;position:relative;">
	    <div id="bannerBox">
		    <ul id="bannerContentID">
            @foreach (BannerInfo info in bannerList)
            {
			    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/banner/@info.Img" width="670px" height="240px"/></a></li>
            }
		    </ul>
	    </div>
	    <ul id="bannerNumID">
        @for (int i = 1; i <= bannerList.Length; i++)
        {
		    <li class="">@i</li>
        }
	    </ul>
    </div>
    @if (bannerList.Length > 1)
    {
    <script type="text/javascript">
        new Marquee(
                    {
                        MSClassID: "bannerBox",
                        ContentID: "bannerContentID",
                        TabID: "bannerNumID",
                        Direction: 2,
                        Step: 0.5,
                        Width: 670,
                        Height: 240,
                        Timer: 20,
                        DelayTime: 3000,
                        WaitTime: 0,
                        ScrollStep: 670,
                        SwitchType: 0,
                        AutoStart: 1
                    })
    </script>
    }
</div>
<div class="gonggao right">
<h2>通知公告<a href="@Url.Action("list", "news")" class="more">更多公告></a></h2>
<ul class="textList">
    @{
        DataTable homeNewsList = News.GetHomeNewsList(0, 7);
        }
    @foreach (DataRow row in homeNewsList.Rows)
    {
        <li><a href="@Url.Action("details", "news", new RouteValueDictionary { { "newsId", row["newsid"] } })">@row["title"]</a></li>
    }

</ul>
</div>
<div class="clear"></div>
</div>

<div id="index2" class="box1210">

<div class="scroll left">
<div id="demo" style="width:600px; overflow:hidden;margin-left:33px; position:relative; height:176px;">
<div class="inScroll" id="demo1">
<ul>
    @{
        List<AdvertInfo> bannerBottomAdvertList = Adverts.GetAdvertList(8);
     }
     @foreach (AdvertInfo info in bannerBottomAdvertList)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="200" height="160" /></a></li>
     }
</ul>
</div>
</div>
<a href="javascript:void(0)" onclick="moveL()" class="bt btL abtn aleft"></a>
<a href="javascript:void(0)" onclick="moveR()" class="bt btR abtn aright"></a>
</div>
<script type="text/javascript">
    var canRoll = false;
    var inBox = document.getElementById("demo1");
    var liList = inBox.getElementsByTagName("li");
    if (liList.length > 3) {
        canRoll = true;
    }
    var boxWidth = 200;
    var step = 0;
    var maxStep = liList.length - 3;
    function moveL() {
        if (!canRoll) {
            return;
        }
        if (step < maxStep) {
            step = step + 1;
            inBox.style.marginLeft = (-1 * (step * boxWidth)) + "px"
        }
    }
    function moveR() {
        if (!canRoll) {
            return;
        }
        if (step > 0) {
            step = step - 1;
            inBox.style.marginLeft = (-1 * (step * boxWidth)) + "px"
        }
    }
</script>

<div class="indexAd right">
    @{
        List<AdvertInfo> newsBottomAdvertList = Adverts.GetAdvertList(9);
     }
    <a href="@newsBottomAdvertList[0].Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@newsBottomAdvertList[0].Body" width="302" height="160" /></a>
</div>

</div>

<!-- 1楼 -->
<div class="floor box1210">
<h2 class="floorT">
<b>1F</b>电脑数码
<ul>
    <li><a href="javascript:void(0)">手机</a></li>
    <li><a href="javascript:void(0)">耳机</a></li>
    <li><a href="javascript:void(0)">数码影音</a></li>
    <li><a href="javascript:void(0)">摄影摄像</a></li>
    <li><a href="javascript:void(0)">DIV攒机</a></li>
    <div class="clear"></div>
</ul>
<div class="floorBt"><a href="#">DIY装机大师</a><a href="#">游戏社区</a></div>
<div class="clear"></div>
</h2>
<div class="floorL left">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList1 = Adverts.GetAdvertList(10);
     }
     @foreach (AdvertInfo info in floor1AdvertList1)
     { 
    <li><a href="@info.Url" class="hot">@info.Body</a></li>
     }
    <div class="clear"></div>
</ul>
    @{
        List<AdvertInfo> floor1AdvertList2 = Adverts.GetAdvertList(11);
     }
     @if (floor1AdvertList2.Count > 0)
     { 
    <a href="@floor1AdvertList2[0].Url" class="floorAD"><img src="@{@WorkContext.ImageCDN}/upload/advert/@floor1AdvertList2[0].Body" width="202" height="155" /></a> 
     }
</div>
<div class="floorR right">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList3 = Adverts.GetAdvertList(12);
     }
     @foreach (AdvertInfo info in floor1AdvertList3)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList4 = Adverts.GetAdvertList(13);
     }
     @foreach (AdvertInfo info in floor1AdvertList4)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList5 = Adverts.GetAdvertList(14);
     }
     @foreach (AdvertInfo info in floor1AdvertList5)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList6 = Adverts.GetAdvertList(15);
     }
     @foreach (AdvertInfo info in floor1AdvertList6)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="clear"></div>
</div>

<!-- 2楼 -->
<div class="floor box1210">
<h2 class="floorT">
<b>2F</b>平板家电
<ul>
    <li><a href="javascript:void(0)">平板</a></li>
    <li><a href="javascript:void(0)">电视</a></li>
    <li><a href="javascript:void(0)">冰箱</a></li>
    <li><a href="javascript:void(0)">厨房电器</a></li>
    <li><a href="javascript:void(0)">生活电器</a></li>
    <div class="clear"></div>
</ul>
<div class="floorBt"><a href="#">合约计划说明</a><a href="#">大家电配送</a></div>
<div class="clear"></div>
</h2>
<div class="floorL left">
<ul>
    @{
        List<AdvertInfo> floor2AdvertList1 = Adverts.GetAdvertList(16);
     }
     @foreach (AdvertInfo info in floor2AdvertList1)
     { 
    <li><a href="@info.Url" class="hot">@info.Body</a></li>
     }
    <div class="clear"></div>
</ul>
    @{
        List<AdvertInfo> floor2AdvertList2 = Adverts.GetAdvertList(17);
     }
     @if (floor2AdvertList2.Count > 0)
     { 
    <a href="@floor2AdvertList2[0].Url" class="floorAD"><img src="@{@WorkContext.ImageCDN}/upload/advert/@floor2AdvertList2[0].Body" width="202" height="155" /></a> 
     }
</div>
<div class="floorR right">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor2AdvertList3 = Adverts.GetAdvertList(18);
     }
     @foreach (AdvertInfo info in floor2AdvertList3)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor2AdvertList4 = Adverts.GetAdvertList(19);
     }
     @foreach (AdvertInfo info in floor2AdvertList4)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor2AdvertList5 = Adverts.GetAdvertList(20);
     }
     @foreach (AdvertInfo info in floor2AdvertList5)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor2AdvertList6 = Adverts.GetAdvertList(21);
     }
     @foreach (AdvertInfo info in floor2AdvertList6)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/advert/@info.Body" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="clear"></div>
</div>


<div id="footer" class="bigBox">
  <div class="box1210">

    @{
        int flag = 1;
        foreach (HelpInfo info in WorkContext.HelpList)
        {
            if (info.Pid != 0)
            {
                if (info.Url.Length == 0)
                {
            <a href="@Url.Action("question", "help", new RouteValueDictionary { { "id", info.Id } })">@info.Title</a>
                }
                else
                {
            <a href="@info.Url">@info.Title</a>
                }
            }
            else
            {
                if (flag != 1)
                {
                @:</div>
            }
            @:<div class="footerBox"><h3>@info.Title</h3>
            flag++;
            }
        }
        if (WorkContext.HelpList.Count > 0)
        {
        @:</div>
    }
    }

  <div class="clear"></div>
  </div>
  <div class="bigBox footerB">
    <div id="footerB">
      <div class="links">
        @foreach (FriendLinkInfo info in WorkContext.FriendLinkList)
        {
        <a href="@info.Url" target="@info.Target" title="@info.Title">@info.Name</a> @:|
        }
      </div>
      <div>北京市公安局朝阳分局备案编号031143485246&nbsp;&nbsp;|&nbsp;&nbsp;京ICP证047722号&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" target="_blank">互联网药品信息服务资格证编号(京)-经营性-2012-0005</a>&nbsp;&nbsp;|&nbsp;&nbsp;新出发京零&nbsp;字第大145218号<br />石家庄蝶影软件开发有限公司 程序版本 @WorkContext.ShopVersion 版权所有 @WorkContext.ShopCopyright</div>
      <div><a href="#"><img width="108" height="40" src="@{@WorkContext.ImageCDN}/themes/default/images/power_jy.gif"></a> <a href="#"><img width="108" height="40" src="@{@WorkContext.ImageCDN}/themes/default/images/power_kx.gif"></a> <a href="#"><img width="108" height="40" src="@{@WorkContext.ImageCDN}/themes/default/images/power_wj.png"></a> <a href="#"><img width="112" height="40" src="@{@WorkContext.ImageCDN}/themes/default/images/power_cx.png"></a></div>
    </div>
  </div>
</div>
@Html.Raw(WorkContext.ExecuteDetail)
@Html.Raw(WorkContext.ShopConfig.Script)
</body>
</html>

